package com.wthink.hzgj.data.domain

import android.os.Parcel
import android.os.Parcelable

class BusDispatch() : Parcelable {
    override fun writeToParcel(dest: Parcel, flags: Int) {
        dest.writeString(line)
        dest.writeInt(ddlx)
        dest.writeString(driverId)
        dest.writeString(driverName)
        dest.writeString(roadCard)
        dest.writeString(ccbh)
        dest.writeString(clbh)
        dest.writeInt(ywlx)
        dest.writeString(startTime)
        dest.writeString(endTime)
        dest.writeInt(startStationId)
        dest.writeString(startStationName)
        dest.writeInt(endStationId)
        dest.writeString(endStationName)
        dest.writeString(fjnr)
        dest.writeString(time)
    }

    var line: String = ""
    var ddlx: Int = 0  // 1:上行，2：下行，3：环行
    var driverId: String = ""  //驾驶员编号
    var driverName: String = ""  //驾驶员名称
    var roadCard: String = ""  //路牌
    var ccbh: String = ""  //车次编号
    var clbh: String = ""  //车辆编号
    var ywlx: Int = 0 //业务类型
    var startTime: String = "" //起始时间
    var endTime: String = ""  //终止时间
    var startStationId: Int = 0//起始站点编号
    var startStationName: String = ""//起始场站车站名称
    var endStationId: Int = 0//终止站点编号
    var endStationName: String = ""//终止场站车站名称
    var fjnr: String = "" // 附加内容
    var time: String = ""//通知时间

    var lineName: String = ""
    var ywlxName: String = ""
    var ddlxName: String = ""

    constructor(parcel: Parcel) : this() {
        line = parcel.readString()!!
        ddlx = parcel.readInt()!!
        driverId = parcel.readString()!!
        driverName = parcel.readString()!!
        roadCard = parcel.readString()!!
        ccbh = parcel.readString()!!
        clbh = parcel.readString()!!
        ywlx = parcel.readInt()
        startTime = parcel.readString()!!
        endTime = parcel.readString()!!
        startStationId = parcel.readInt()
        startStationName = parcel.readString()!!
        endStationId = parcel.readInt()
        endStationName = parcel.readString()!!
        fjnr = parcel.readString()!!
        time = parcel.readString()!!
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<BusDispatch> {
        override fun createFromParcel(parcel: Parcel): BusDispatch {
            return BusDispatch(parcel)
        }

        override fun newArray(size: Int): Array<BusDispatch?> {
            return arrayOfNulls(size)
        }
    }
}